package com.mjw.tender.service;

import com.mjw.tender.api.CategoryService;
import com.mjw.tender.domain.Category;
import com.mjw.tender.mapper.CategoryMapper;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;

@Service(version = "1.0.0")
public class CategoryServiceImpl implements CategoryService {

    @Resource
    CategoryMapper categoryMapper;

    @Override
    public Category get(Long id) {
        return categoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Category> getAll() {
        return categoryMapper.selectAll();
    }
}
